package com.bd.scm.module.enums;

import lombok.Getter;

@Getter
public enum ExceptionEmun {

    ACCOUNTS_ERROR(60001,"存在封账记录"),
    USER_ERROR_NAMEREPETITION(30001,"用户工号重复"),
    USER_ERROR_USERID(30002,"用户身份证重复"),
    USER_ERROR_NOTFOUND(30002,"用户不存在"),
    USER_ERROR_NOTDEPTMANAGER(30002,"不是部门负责人"),
    USER_ERROR_Quit(30003,"用户离职失败"),
    USER_ERROR_sock(30003,"有用户锁定失败"),
    USER_ERROR_FADING(30004,"没有剩余法定年假"),
    USER_ERROR_FADING2(30005,"锁定年假不得大于法定年假"),
    USER_ERROR_FADING3(30006,"输入锁定年假不得大于保存锁定年假"),
    USER_ERROR_FADING4(30007,"某人调休超出调休上限"),
    USER_ERROR_LOAN(30003,"用户调动失败"),

    DEPT_ERROR_NAMEREPETITION(10001,"部门名称重复"),
    DEPT_ERROR_NUMBERCREATE(10002,"生成部门编号出错"),

    LOGIN_TIMEOUTORNOTLOGIN(11000, "未登录或登录已超时,请重新登录"),

    PLACE_ERROR_NAMEREPETITION(20001,"同组场所名称不能重复"),
    HAVE_CHILD_PLACE(20002,"该场所含有子场所，无法删除"),
    HAVE_DEVICE_PLACE(20003,"该场所含有设备，无法删除"),
    HAVE_DOOR_PLACE(20004,"该场所含有门，无法删除"),
    HAVE_XFTIME_PLACE(20005,"该场所含有消费时段，无法删除"),
    HAVE_ROOM_PLACE(20006,"该场所包含房间（教室、会议室、宿舍等），无法删除"),

    BILL_APPLY_APPROVER_FIRST_NONE(30001, "获取一级审批人失败"),
    BILL_APPLY_APPROVER_SECOND_NONE(30001, "获取二级审批人失败"),

//    ITEMDESC_COLUMNS_NODATA(30001,"未查到数据"),
    SERVICE_ERROR(90001,"服务器错误"),
    SERVICE_ERROR_NODATA(90002,"未查到数据"),
    SERVICE_ERROR_ADD(90003,"新增数据失败"),
    SERVICE_ERROR_UPDATE(90003,"修改失败"),
    SERVICE_ERROR_DELETE(90004,"删除失败"),
    SERVICE_ERROR_PARAMS(90005,"参数无效"),
    SERVICE_ERROR_SAVE(90006,"保存失败"),
    SERVICE_ERROR_OPERATE(90006,"操作失败"),


    SERVICE_ERROR_REQUEST_EMPTY(90101, "当前请求参数为空或数据缺失，请联系管理员"),



    SERVICE_SUCCESS_DELETE(91001,"删除成功"),
    SERVICE_SUCCESS_ADD(91002,"保存成功"),


    SCHEDULE_ATTENDANCE_ERROR(80001, "定时任务考勤自动计算出错"),


    IMPORT_SCHEDULE_FORMAT_ERROR(40001,"工号或排班年月存在空值")
    ;//这个后面必须有分号

    private int code;
    private String msg;

    private ExceptionEmun(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

}
